package ipad.asia.dao;

import ipad.asia.entity.Express;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface ExpressDao extends JpaRepository<Express,Long> {
    List<Express> findByShopId(int shopId);
    List<Express> findByConsumerId(int consumerId);
    Express findByOrderId(int orderId);
    @Modifying
    @Query("update Express set statues=?2 where id=?1")
    void updateExpressStatue(int statues,int id);
}
